package com.hostmanagement.user;

import java.util.Date;

/**
 * User detail information bean
 * 
 * @author glen
 * 
 */
public class UserBean {

	private int userId;
	private String userName = null;
	private String userPassword = null;
	private Date regTime = null;
	private int ruleId;
	private String userStatus = null;
	private String dogId = null;

	private int detailId;
	private String realName = null;
	private String sex = null;
	private Date birthday = null;
	private String accontId = null;
	private String phone1 = null;
	private String phone2 = null;
	private String mobile = null;
	private String email = null;
	private String address = null;
	private String remark = null;

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserPassword() {
		return userPassword;
	}

	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}

	public String getUserStatus() {
		return userStatus;
	}

	public void setUserStatus(String userStatus) {
		this.userStatus = userStatus;
	}

	public String getDogId() {
		return dogId;
	}

	public void setDogId(String dogId) {
		this.dogId = dogId;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getAccontId() {
		return accontId;
	}

	public void setAccontId(String accontId) {
		this.accontId = accontId;
	}

	public String getPhone1() {
		return phone1;
	}

	public void setPhone1(String phone1) {
		this.phone1 = phone1;
	}

	public String getPhone2() {
		return phone2;
	}

	public void setPhone2(String phone2) {
		this.phone2 = phone2;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public int getDetailId() {
		return detailId;
	}

	public Date getBirthday() {
		return birthday;
	}

	public boolean validateData() {
		
		boolean validation = false;
		
		if (this.userName == null || this.userName.equals("")|| this.userName.length() > 20) {
			validation = false;
		}
		
		if (this.userPassword == null || this.userPassword.equals("") || this.userPassword.length() > 50) {
			validation = false;
		}
		validation = true;		
		return validation;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public Date getRegTime() {
		return regTime;
	}

	public void setRegTime(Date regTime) {
		this.regTime = regTime;
	}

	public int getRuleId() {
		return ruleId;
	}

	public void setRuleId(int ruleId) {
		this.ruleId = ruleId;
	}

	public void setDetailId(int detailId) {
		this.detailId = detailId;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

}
